import java.util.Scanner;

public class Main {

    public static void main4(String[] args) {
        int ch = (int)'1';
        System.out.println(ch);
    }
1
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        String str = String.valueOf(num);
        int count = 0;
        while(num!=0){
            num/=10;
            count++;
        }
        StringBuilder str2 = new StringBuilder("");
        int[] array = new int[10];
        for(int i = str.length()-1;i>=0;i--){
            int ch = str.charAt(i)-48;
            if(array[ch]==0){
                str2.append(str.charAt(i));
                array[ch]++;
            }
        }
        System.out.println(str2.toString());
    }

    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        int[] value = new int[11111112];
        for(int i =0;i<num;i++){
            int index = scanner.nextInt();
            value[index] += scanner.nextInt();
        }

        for(int i = 0;i< 11111112;i++){
            if(value[i]!=0){
                System.out.println(i+" "+value[i]);
            }
        }
    }

/*        int[] index = new int[num];
        int[] value = new int[num];
        int tem = 0;
        for(int i = 0;i<num;i++){
            index[i-tem] = scanner.nextInt();
            value[i-tem] = scanner.nextInt();
            if(i!=0){
                for(int j = 0;j < i;j++){
                    if(index[i]==index[j]){
                        value[i] += value[j];
                        tem++;
                    }
                }
            }
        }

        for(int i = 0;i<num-tem;i++){
            System.out.println(index[i]+" "+value[i]);
        }*/





























    public static void main2(String[] args) {
          Scanner scanner = new Scanner(System.in);
          float num1 = scanner.nextFloat();
          float num2 = num1-(int)num1;
          if(num2>=0.5){
              System.out.println((int)num1+1);
          }else{
              System.out.println((int)num1);
          }
    }

    public static StringBuilder func(String str){
        int[] ch = new int[257];
        StringBuilder set = new StringBuilder("");
        int tem;
        for(int i = 0;i<str.length();i++){
            tem = str.charAt(i);
            if(ch[tem]==0){
                set.append(str.charAt(i));
                ch[tem]++;
            }

        }
        return set;
    }

    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        StringBuilder set = func(str);
        System.out.println(set.toString());
    }
}
